<!DOCTYPE html>
<html lang="en" xmlns="http://www.w3.org/1999/html">
<head>
    <meta charset="UTF-8">
    <title>Command</title>
</head>
<br>
<div>Command:</div>
<form name="form1" id="form1" method="post">
    PassWord: <input type="password" name="password" required="required"> </br>
    Last ExecTime: {{ .ExceTime }}
    <hr style="height:1px;border:none;border-top:1px solid #555555;"/>
    预警重新加载：<input type="submit" value="Reload" name="Reload">
    <hr style="height:1px;border:none;border-top:1px solid #555555;"/>
    是否使用当前出击：
    <table border="1">
        <tr>
            <th align="center">Period</th>
            <th align="center">State</th>
            <th align="center">Enable</th>
            <th align="center">Disable</th>
        </tr>
        {{ range $i,$v := .State }}
            {{ if eq $i 0 }}
                <tr>
                    <td align="center">
                        日线
                    </td>
                    <td align="center">
                        {{ $v }}
                    </td>
                    <td align="center">
                        <button type="submit" name="enable" value="enable_0">enable</button>
                    </td>
                    <td align="center">
                        <button type="submit" name="disable" value="disable_0">disable</button>
                    </td>
                </tr>
            {{ else if eq $i 1}}
                <tr>
                    <td align="center">
                        两小时线
                    </td>
                    <td align="center">
                        {{ $v }}
                    </td>
                    <td>
                        <button type="submit" name="enable" value="enable_1">enable</button>
                    </td>
                    <td>
                        <button type="submit" name="disable" value="disable_1">disable</button>
                    </td>
                </tr>
            {{ else if eq $i 2}}
                <tr>
                    <td align="center">
                        一小时线
                    </td>
                    <td align="center">
                        {{ $v }}
                    </td>
                    <td>
                        <button type="submit" name="enable" value="enable_2">enable</button>
                    </td>
                    <td>
                        <button type="submit" name="disable" value="disable_2">disable</button>
                    </td>
                </tr>
            {{ else if eq $i 3 }}
                <tr>
                    <td align="center">
                        半小时线
                    </td>
                    <td align="center">
                        {{ $v }}
                    </td>
                    <td>
                        <button type="submit" name="enable" value="enable_3">enable</button>
                    </td>
                    <td>

                        <button type="submit" name="disable" value="disable_3">disable</button>

                    </td>
                </tr>
            {{ end }}
        {{ end }}
    </table>
</form>
</body>
</html>
